package com.example.dqdq.lzyim_asm_tvapp.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.util.Log;
import android.widget.ImageView;
import android.widget.Toast;

import com.example.dqdq.lzyim_asm_tvapp.BootAdActivity;
import com.example.dqdq.lzyim_asm_tvapp.MainActivity;
import com.example.dqdq.lzyim_asm_tvapp.api.API;
import com.example.dqdq.lzyim_asm_tvapp.https.HttpManger;
import com.example.dqdq.lzyim_asm_tvapp.utils.FileDownLoad;

import org.json.JSONException;
import org.json.JSONObject;
import org.xutils.common.Callback;
import org.xutils.x;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by DQDQ on 16/7/7.
 */
public class BootBroadcastReceiver extends BroadcastReceiver {

    static final String action_boot = "android.intent.action.BOOT_COMPLETED";
    @Override
    public void onReceive(Context context, Intent intent) {
        if(intent.getAction().equals(action_boot)) {

            JPushInterface.init(context);

            Intent ootStartIntent = new Intent(context, BootAdActivity.class);
            ootStartIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            Log.e("Test","start");
            context.startActivity(ootStartIntent);

//            JPushInterface.setDebugMode(true);
         }

    }




}
